<?php
//Set up the system
require('config.include.php');
//Auth stuff
require('auth.include.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard</title>
<link rel="stylesheet" href="admin.css" />
</head>

<body>
<div id="wrapper">
	<div id="header">
    	<?php echo('<a href="../" class="breadcrumb">'.SITE_TITLE.'</a> &raquo; <a href="dashboard.php" class="breadcrumb">Dashboard</a>'); ?>
    </div>
    <div id="sidebar">
<?php
	require('nav.include.php');
?>
    </div>
    <div id="content">
    	<div class="contentblock">
			<?php
				echo('<h2>Welcome, '.$_p->tb_users->getFieldValue($_SESSION['auth_id'],'username').'</h2>');
				
				//Find unapproved comments
				$unapproved_comments=$_p->tb_comments->select('!%approved%');
				echo('There are '.count($unapproved_comments).' comments awaiting approval.');
			?>
        </div>
    </div>
    <div id="footer">
    </div>
</div>
</body>
</html>